set terminal pdf
set output 'result.pdf'

#set logscale x
set logscale y
#set xrange [1:32]
#set yrange [1e-6:1000]

set grid
set key bottom right

set xlabel 'Threads'
set ylabel 'Runtime [s]'

set title 'Pi Approximation with OpenMP'
plot \
'./data/res_100.txt' using 1:3 title "100 Iterations" with linespoints, \
'./data/res_1000.txt' using 1:3 title "1000 Iterations" with linespoints, \
'./data/res_5000.txt' using 1:3 title "5000 Iterations" with linespoints, \
'./data/res_10000.txt' using 1:3 title "10000 Iterations" with linespoints, \
'./data/res_100000.txt' using 1:3 title "100000 Iterations" with linespoints

set title 'Pi Approximation with OpenMP (-O0)'
plot \
'./data/res_noopt_100.txt' using 1:3 title "100 Iterations" with linespoints, \
'./data/res_noopt_1000.txt' using 1:3 title "1000 Iterations" with linespoints, \
'./data/res_noopt_5000.txt' using 1:3 title "5000 Iterations" with linespoints, \
'./data/res_noopt_10000.txt' using 1:3 title "10000 Iterations" with linespoints, \
'./data/res_noopt_100000.txt' using 1:3 title "100000 Iterations" with linespoints

